package littlepicture.data.dao.impl;

import java.util.List;

import littlepicture.data.dao.EmployeeDao;
import littlepicture.data.model.Employee;
import littlepicture.data.template.ModulePersons;

import com.ibatis.dao.client.DaoManager;
import com.ibatis.dao.client.template.SqlMapDaoTemplate;

public class EmployeeDaoImpl extends SqlMapDaoTemplate implements EmployeeDao {

	public EmployeeDaoImpl(DaoManager daoManager) {
		super(daoManager);
	}

	public void addEmployee(Employee employee) {
		insert("addEmployee", employee);
	}

	public void deleteEmployeeById(int id) {
		delete("deleteEmployee", new Integer(id));
	}

	public void updateEmployee(Employee employee) {
		update("updateEmployee", employee);
	}
	
	public List<ModulePersons> getModulePersons() {
		return queryForList("getModulePersons", null);
	}
	
}
